﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="System.Web.Mvc" %>
<%@ Import Namespace="System.Web.Mvc.Html" %>
<%@ Import Namespace="MvcMembership.Controllers" %>
<asp:Content ID="content" ContentPlaceHolderID="MainContent" runat="server">
<div class="corpo">
<h2 class="MvcMembership">Usuários de "<% =( ViewData["Role"] as MembershipRoleViewData ).Name %>" Grupo</h2>
<h3 class="MvcMembership"><% =Html.ActionLink("<< Retornar para Membership Administration", "index", "MembershipAdministration")%></h3>

<fieldset class="MvcMembership">
	<legend>Usuário(s) de "<% =( ViewData["Role"] as MembershipRoleViewData ).Name %>" Grupo</legend>

	<% if( ( ViewData["Role"] as MembershipRoleViewData ).Users.Count > 0 ){ %>
	<ol>
		<% foreach( MembershipUser user in ( ViewData["Role"] as MembershipRoleViewData ).Users ){ %>
		<li><% =Html.ActionLink(user.UserName,"UserDetails", new { id = (Guid)user.ProviderUserKey})%> 
		(<% =Html.ActionLink( "Remove", "RemoveUserFromRole", new { userId = (Guid)user.ProviderUserKey , roleName = (ViewData["Role"] as MembershipRoleViewData ).Name})%>)</li>
		<% } %>
	</ol>
	<% }else{ %>
	<div>Não existe usuário neste Grupo.</div>
	<% } %>
</fieldset>
</div>
</asp:Content>